home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / recent / iib122.lha / IIB / Threads / Alpha_Channel < prev    next >
Internet Message Format  |  1998-02-16  |  15KB

  1. Date:         Thu, 16 Oct 1997 11:57:01 +0400
  2. From: Charles Blaquière <blaq@INTERLOG.COM>
  3. Subject:      Re: [IML] IFW: Alpha Channel
  4.  
  5. << original Subject whas the question for a Alpha Channel support in
  6. imagine >>
  7.  
  8. Mike Tidwell wrote:
  9. >
  10. > 4. Depth Alpha - this is a separate 8 bit grayscale file that renders the
  11. > picture in shades of gray.  For example the deeper things are in the scene
  12. > depends on how dark they are.
  13.  
  14. Actually, there's an Imagine texture called ZBuffer.itx, which you can
  15. apply to all objects in a scene. It does require setting up a duplicate
  16. project and re-texturing your objects, but at least the ability to
  17. output a Z buffer is already in there.
  18.  
  19. -------------------------------------------------------------------
  20. << Here are more postings about alpha channels. Very interesting >>
  21. -------------------------------------------------------------------
  22.  
  23. Date:         Fri, 16 Jan 1998 13:45:13 +0400
  24. From: Charles Blaquiere <blaq@INTERLOG.COM>
  25. Subject:      Re: [IML] IMPULSE: alpha channel (was: IFW:Stuff)
  26.  
  27. mike halvorson wrote:
  28. >
  29. > As for alpha channel, as I said full support will be in 2.0, now why
  30. > dont you tell me and all the others what you think this is, so that in
  31. > advance of the release of the software, we can make sure that what we
  32. > put in and what you expect are clear for all to see and comment on.
  33. >
  34. > What do you think you can do with this feature, how are you going to use
  35. > it, what controls do you think should be a part of this.
  36.  
  37. OK Mike, I'll bite. I see alpha channel as a two-pronged issue: input
  38. and output.
  39.  
  40. INPUT
  41. -----
  42.  
  43. I'd like to see Imagine be able to read brushmap images that have a
  44. built-in alpha channel or transparency layer; this would essentially
  45. make the Genlock checkbox obsolete. In addition to enabling varying
  46. levels of transparency in different areas of the same brushmap, it would
  47. also give us fully antialiased edges. (Does anyone still create text in
  48. a paint program without anti-aliased edges? Then why should we still
  49. have to live with an all-or-nothing, 1-bit Genlock?)
  50.  
  51. Judging by Photoshop's Save As dialog, it seems as if the file formats
  52. that support more than three 8-bit channels are Photoshop, PICT, Pixar,
  53. Raw, Targa, and TIFF. Imagine already supports Targa and TIFF, so I
  54. envision adding alpha channel support to these two formats.
  55.  
  56. In Imagine's brushmap Attributes dialog, on the General tab, I envision
  57. a new control, next to Mix/Morph, called "Alpha Channel", composed of a
  58. text field and Browse button, just like the Subgroup and Tacking State.
  59. It would be enabled (i.e. not greyed out) whenever the brushmap was a
  60. Targa or TIFF file. Clicking on the Browse button would bring up a list
  61. of all the channel names in the file, from which a user could select
  62. which contains alpha data.
  63.  
  64. If the field is disabled, or if it's enabled and blank, Imagine will
  65. apply the brushmap using the Mix/Morph value only. If an alpha channel
  66. has been selected, then Imagine will use (Mix/Morph value)*(Alpha
  67. Channel pixel) to define the strength with which the current brushmap
  68. pixel will be applied. This is important: even if I use an alpha
  69. channel, I still want the global control offered by Mix/Morph, to fade a
  70. brushmap in and out, for example.
  71.  
  72. OUTPUT
  73. ------
  74.  
  75. When rendering images, I'd like Imagine to output alpha channel
  76. information. This would be controlled via the Project/Render dialog's
  77. Image Files tab. There would be a checkbox called "Save alpha channel",
  78. just like the one for "Save Image Files"; an "Inverse Video"-type radio
  79. button; and a radio button to select whether to save alpha data as an
  80. additional channel inside each rendered image, or as a separate set of
  81. image files:
  82.  
  83.         [X] Save Alpha Channel      White is: (*) Fully Transparent
  84.                                               ( ) Fully Opaque
  85.  
  86.         (*) Additional Channel Inside Image:
  87.  
  88.             Channel Name:
  89.             [Opacity______________]
  90.  
  91.         ( ) Separate Alpha Image File:
  92.  
  93.             Filename(s)
  94.             [_________________________]  [Browse]
  95.  
  96.             File Type
  97.             [Windows BMP 24 (.BMP)] [V]
  98.  
  99.         [X] Don't Render Background
  100.  
  101. All these controls would be greyed out unless the File Type (in the main
  102. "Save Image Files" section) was Targa, TIFF, or Photoshop -- the output
  103. formats supported by Imagine, which allow additional channels. "Channel
  104. Name" would be a text field, prefilled with the name "Opacity". The
  105. "Separate File" controls are just like those in the main "Save Image
  106. Files" section. And the "White is:" radio button determines whether an
  107. alpha channel value of 255 represents full transparency (like Imagine's
  108. Filter mapping) or full opacity (like Photoshop's Layer Masks). The
  109. "Don't Render Background" checkbox is discussed below.
  110.  
  111. As far as the output alpha data itself, it should be the aggregate
  112. transparency of everything in the scene at a certain pixel, disregarding
  113. the Globals Backdrop option. Even if a Backdrop is specified, the alpha
  114. channel should consider it transparent. (If the user creates a backdrop
  115. of their own by adding a large plane or sphere to the scene, it's an
  116. Imagine object and that's a different story)
  117.  
  118. By aggregate transparency, I mean that the transparency value of each
  119. object face present in the pixel being evaluated, must be multiplied.
  120. For example:
  121.  
  122.         +--------+
  123.         | B      |      A
  124.         |   +----------------+
  125.         |   | D  |           |
  126.         |   |    |           |
  127.         +---|----+     C     |
  128.             |                |
  129.             +----------------+
  130.  
  131. Let's assume the square object is 50% transparent, and the rectangle is
  132. 30% transparent. In area A, no objects are present; transparency is
  133. 100%. Transparency is 50% in area B, and 30% in area C. In area D, the
  134. objects overlap, and transparency is (50%)*(30%) = 15%. It's quite
  135. simple, really.
  136.  
  137. This takes care of the alpha data. What about the RGB color data? When
  138. rendering with an alpha channel, you obviously have compositing in mind,
  139. and that changes the rules regarding RGB value.
  140.  
  141. I propose the following: when rendering for compositing purposes, it's
  142. preferable NOT to blend the color of objects with that of the
  143. background. The RGB value saved in the render file should be the "pure"
  144. object color without a drop of background mixed in, regardless of
  145. aggregate transparency. The reason is simple: transparency is addressed
  146. in the alpha channel; the RGB channels are there to record the
  147. unadulterated object color, without regard for transparency. The best
  148. way to convince you why this is important, is by example.
  149.  
  150. Let's say you render a semitransparent, black-and-white checkered
  151. sphere, to be composited over a variety of scenes. Because of its
  152. transparency, the sphere will pick up whatever background color you used
  153. in Imagine; if you used red, the sphere will be dark red and light pink;
  154. if it's blue, the sphere will have a blue tint; and so on.
  155.  
  156. "What about rendering on black, or white, or medium grey?" Well, if you
  157. render on black, the black areas will be OK, but the white areas will
  158. become medium grey due to the background. When you composite this
  159. object, you'll have a black-and-grey sphere flying around your
  160. composition. If you render on white, then it's the black areas that will
  161. render as medium grey, and again your sphere will be unacceptable. If
  162. you render on medium grey, then both the white and black parts will get
  163. some medium grey mixed in, making your object a dark-and-light grey
  164. sphere.
  165.  
  166. In all cases, blending the object color with the Imagine background
  167. brings undesirable side effects. This is why I propose the "Don't render
  168. background" checkbox: when checked, it prevents background color (from
  169. the Backdrop image or Zenith/Horizon colors) from being blended into the
  170. rendered image. The result will be pure, unadulterated object colors
  171. that will composite cleanly on any project.
  172.  
  173. And, if you think that this only affects semitransparent objects and you
  174. can live with rendering only totally opaque objects, remember one thing.
  175. Edge pixels have various levels of transparency (if alpha support is
  176. properly implemented), so even opaque objects will get some background
  177. color polluting their edges. You'll get ugly edge artifacts when
  178. compositing, similar to those seen on the Web when GIF icons were
  179. created on a background that doesn't match that of the web page on which
  180. they were placed.
  181.  
  182. Frankly, I don't see a point in blending the Imagine background into
  183. your objects, but I prefer having a checkbox to control this behavior,
  184. just in case there's something I missed. Of course, the default value
  185. should be "Don't Render Background" so that users always do the right
  186. thing, _unless_ they voluntarily uncheck the box.
  187.  
  188. ----------------------------------
  189.  
  190. Date:         Fri, 16 Jan 1998 21:47:55 +0400
  191. From: Charles Blaquiere <blaq@INTERLOG.COM>
  192.  
  193. Stephen G. wrote:
  194. >
  195. > Charles Alpha Channel request and information is exactly what I would like
  196. > to see in Imagine.  I couldn't have explained it better myself.  I am only
  197. > restating this because I want to add my vote here.
  198.  
  199. Thanks for the vote of confidence, Stephen. I do have a question for IML
  200. members who have had real-life experience with some of the other 3D
  201. software out there: do they actually implement my "no background"
  202. rendering method when alpha channels come into play? After all, there's
  203. a possibility that all the software in the world pollutes
  204. semitransparent (and antialiased edge) pixels with whatever was in the
  205. background at render time, and nobody's cried foul yet. I find it
  206. doubtful, though; if I were a full-time professional user, and my
  207. software left ugly color  artifacts, I'd be crying bloody murder. (Oops,
  208. there's the "B" word %^S )
  209.  
  210. ----------------------------------
  211.  
  212. Date:         Sat, 17 Jan 1998 11:30:50 +0400
  213. From: Charles Blaquiere <blaq@INTERLOG.COM>
  214.  
  215. Paul Wehner wrote:
  216. >
  217. > I think an alpha channel option in Imagine would be very useful for
  218. > some users. I think that the majority of people probably wouldn't make
  219. > full use of it.
  220.  
  221. I agree, but it's the kind of thing that might become more popular than
  222. we may think; for example, many of us might start to render animations
  223. in layers, allowing us to apply a quick Gaussian blur to the background
  224. for more realism. (It's so much faster to do a 2D blur in Photoshop than
  225. to use Imagine's full-fledged, 3D-aware blur)
  226.  
  227. Oh, and speaking of which, there's a suggestion I forgot to include in
  228. my initial post: along with a new section for "save alpha channel"
  229. controls, there could be another one for "save Z-buffer". (That's the
  230. standard name given, in CG circles, to the array of numbers that
  231. describe the relative distance of objects to the camera, for each pixel.
  232. In Imagine, this lies along the camera's Y axis, but historically, this
  233. has been labelled as Z) To avoid confusion, I'd call it a "depth
  234. channel" instead:
  235.  
  236.         [X] Save Depth Info         White is: (*) Closest to camera
  237.                                               ( ) Furthest from camera
  238.  
  239.         Depth Range:  from [0_______] Imagine Units
  240.                         to [32767___] Imagine Units
  241.  
  242.         (*) Additional Channel Inside Image:
  243.  
  244.             Channel Name:
  245.             [Depth________________]
  246.  
  247.         ( ) Separate Depth Image File:
  248.  
  249.             Filename(s)
  250.             [_________________________]  [Browse]
  251.  
  252.             File Type
  253.             [Windows BMP 24 (.BMP)] [V]
  254.  
  255. Again, you have an "inverse video"-type control to determine whether
  256. depth is saved as a black-to-white or white-to-black greyscale. There
  257. are additional controls to set the range represented by this range;
  258. anything outside that range would be clamped to black or white. You
  259. could shorten the "to" distance, for example, if your scene basically
  260. fit into a 5000-unit radius from the camera; this would give you more
  261. precision for nearer objects.
  262.  
  263. I only suggest this additional functionality if its implementation is
  264. practical, i.e. if this would be a trivial development effort on the
  265. part of Impulse. I feel even less people would use this data than the
  266. alpha channel, but if we're lucky, at render time, Imagine has these
  267. numbers just ready to be written to disk.
  268.  
  269. Two ways to use this information when compositing: (1) to add elements
  270. in your composition that will move in front of parts of the rendered
  271. scene, but behind others; (2) to apply a different degree of blurring to
  272. each pixel, based on its Z-buffer value -- you'd get DOF effects in a
  273. fraction of the time it takes in Imagine.
  274.  
  275. > I'd rather Impulse spend resources on fixing current small bugs and
  276. > adding new features.
  277.  
  278. I have always thought that Impulse's single highest priority should be
  279. to squash bugs.
  280.  
  281. > I think that anyone who absolutely
  282. > understands the need for alpha channel in their work probably already
  283. > has some compositing software like after effects and digital fusion.
  284.  
  285. Yes, but you're missing the point: without alpha channel information,
  286. these people have no easy way to composite Imagine renders on top of
  287. other elements. They have the software, but are missing an important
  288. piece of the puzzle.
  289.  
  290. ----------------------------------
  291.  
  292. Date:         Sun, 18 Jan 1998 10:51:52 -0600
  293. From: "Stephen G." <sgiff@AIRMAIL.NET>
  294.  
  295. At 09:45 PM 1/17/98 -0500, you wrote:
  296. >
  297. >I've been creating matte elements and using matte elements for compositing
  298. >with Imagine or Imagine renders for years.  I've composited actors in 3D
  299. >generated sets right in Imagine utilizing color-maps and synchronized filter-
  300. >maps with pixel perfect registration with flawless results.  And I've
  301. >generated matte elements to cut out Imagine renders to be composited with
  302. >imported live-action in Digital On-line suites, After EFX or Premiere.  Alpha
  303. >Channels may make this simpler but the capability is present now with a
  304. >seperate scanline render and the lights turned off isolating what you want to
  305. >composite.
  306. >
  307.  
  308. You can create a separate alpha channel by turning off lights in your scene
  309. and rendering every object as 100%bright white.  This however does not take
  310. into account transparent objects nor does it allow any visible lights or
  311. fog objects unless you leave them white as well.  You still will need a way
  312. to composite the alpha channel render you have made with your original
  313. targa files to make true 32 bit alpha channel frames.  Mark Willis has
  314. written a utility to do this but it still would be much easier to do if it
  315. were a built in feature in Imagine.  The other thing I wanted to say is
  316. that no external program can create an alpha channel from any image
  317. automatically.  It has to be done inside Imagine and that is why it's
  318. important.  Sure some of you will say that you can manually create an alpha
  319. channel in Photoshop with some hard work depending upon the image but for
  320. video frames this would be far to time consuming.
  321.